package com.xius.controller;
import com.xius.common.ApiController;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.github.xiaoymin.knife4j.annotations.DynamicParameter;
import com.github.xiaoymin.knife4j.annotations.DynamicParameters;
import com.xius.common.R;
import com.xius.service.SecRoleService;
import com.github.pagehelper.PageHelper;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.io.Serializable;
import java.util.List;
import java.util.Map;

/*
* *
* @author makejava
* @since 2020-06-12 17:14:18
*/
@RestController@RequestMapping("/api/secRole")public class SecRoleController extends ApiController {
    
    /*
    *     * 服务对象
    */
    @Resource    private SecRoleService secRoleService;
    @PostMapping("/queryAll")    @ApiOperationSupport(params = @DynamicParameters(                name = "SecRoleControllerQueryAll",                properties = {
    @DynamicParameter(name = "secRoleId", value = "主键"),@DynamicParameter(name = "secRoleName", value = "角色名"),@DynamicParameter(name = "secRoleDescription", value = "描述"),@DynamicParameter(name = "secRoleCreateTime", value = "创建时间"),@DynamicParameter(name = "secRoleUpdateTime", value = "更新时间"),    }
    ))    public R queryAll(@RequestBody Map<String,Object> map) {
        return success(secRoleService.queryAll(map));
    }
    @PostMapping("/queryAllJoin")    @ApiOperationSupport(params = @DynamicParameters(                    name = "SecRoleControllerQueryAllJoin",                    properties = {
    @DynamicParameter(name = "secRoleId", value = "主键"),@DynamicParameter(name = "secRoleName", value = "角色名"),@DynamicParameter(name = "secRoleDescription", value = "描述"),@DynamicParameter(name = "secRoleCreateTime", value = "创建时间"),@DynamicParameter(name = "secRoleUpdateTime", value = "更新时间"),    }
    ))    public R queryAllJoin(@RequestBody Map<String,Object> map) {
        return success(secRoleService.queryAllJoin(map));
    }
    @PostMapping("/queryById")    @ApiOperationSupport(params = @DynamicParameters(                    name = "SecRoleControllerQueryById",                    properties = {
    @DynamicParameter(name = "secRoleId", value = "主键"),@DynamicParameter(name = "secRoleName", value = "角色名"),@DynamicParameter(name = "secRoleDescription", value = "描述"),@DynamicParameter(name = "secRoleCreateTime", value = "创建时间"),@DynamicParameter(name = "secRoleUpdateTime", value = "更新时间"),    }
    ))    public R queryById(@RequestBody Map<String,Object> map) {
        return success(secRoleService.queryById(map));
    }
    @PostMapping("/insert")    @ApiOperationSupport(params = @DynamicParameters(                    name = "SecRoleControllerInsert",                    properties = {
    @DynamicParameter(name = "secRoleId", value = "主键"),@DynamicParameter(name = "secRoleName", value = "角色名"),@DynamicParameter(name = "secRoleDescription", value = "描述"),@DynamicParameter(name = "secRoleCreateTime", value = "创建时间"),@DynamicParameter(name = "secRoleUpdateTime", value = "更新时间"),    }
    ))    public R insert(@RequestBody Map<String,Object> map) {
        return success(this.secRoleService.insert(map));
    }
    @PostMapping("/inserts")    @ApiOperationSupport(params = @DynamicParameters(                    name = "SecRoleControllerInserts",                    properties = {
    @DynamicParameter(name = "secRoleId", value = "主键"),@DynamicParameter(name = "secRoleName", value = "角色名"),@DynamicParameter(name = "secRoleDescription", value = "描述"),@DynamicParameter(name = "secRoleCreateTime", value = "创建时间"),@DynamicParameter(name = "secRoleUpdateTime", value = "更新时间"),    }
    ))    public R inserts(@RequestBody List<Map<String,Object>> list) {
        return success(this.secRoleService.inserts(list));
    }
    @PostMapping("/update")    @ApiOperationSupport(params = @DynamicParameters(                    name = "SecRoleControllerUpdate",                    properties = {
    @DynamicParameter(name = "secRoleId", value = "主键"),@DynamicParameter(name = "secRoleName", value = "角色名"),@DynamicParameter(name = "secRoleDescription", value = "描述"),@DynamicParameter(name = "secRoleCreateTime", value = "创建时间"),@DynamicParameter(name = "secRoleUpdateTime", value = "更新时间"),    }
    ))    public R update(@RequestBody Map<String,Object> map) {
        return success(this.secRoleService.update(map));
    }
    @PostMapping("/deleteByIds")    @ApiOperationSupport(params = @DynamicParameters(                    name = "SecRoleControllerDeleteByIds",                    properties = {
    }
    ))    public R deleteByIds(@RequestBody Map<String,Object> map) {
        return success(this.secRoleService.deleteByIds(map));
    }
    @PostMapping("/deleteById")    @ApiOperationSupport(params = @DynamicParameters(                    name = "SecRoleControllerDeleteById",                    properties = {
    }
    ))    public R deleteById(@RequestBody Map<String,Object> map) {
        return success(this.secRoleService.deleteById(map));
    }
}
